<?php
include("admin/cls/cls_user.php");
include("admin/cls/sesion.php");
session_start();
$correo=$_GET["email"];
$contrasenha=$_GET["password"];
$usuario = new cls_user();


if( isset($correo) && !empty($correo)  && isset($contrasenha) && !empty($contrasenha) ) {

		$var=$usuario->loginUser($correo,$contrasenha);
		
			while($mostrar = mysql_fetch_array($var)){
				$my_id=$mostrar['user_id'];
				$email=$mostrar['email'];
				$nombre=$mostrar['name'];
				$password=$mostrar['password'];
			}
		
		if($correo==$email && $contrasenha=$password){
			$_SESSION[""] = new sesion();
			$_SESSION[""]->usr($my_id,$nombre);
			$usuario->change_estate($my_id,'o');	
			echo "yes";
	}else{
	echo "no";
	}
	}
else {
	echo "no";
}

?>